package com.example.myapplication.presenter;

import com.example.myapplication.base.BasePresenter;
import com.example.myapplication.bean.QuestionsBean;
import com.example.myapplication.model.QuestionsModel;
import com.example.myapplication.net.ResultCallBack;
import com.example.myapplication.view.QuestionsView;

public class QuestionsPresenter extends BasePresenter<QuestionsView> {

    private QuestionsModel questionsModel;

    @Override
    protected void initModel() {
        questionsModel = new QuestionsModel();
        addModel(questionsModel);
    }

    public void getQuestionsData() {
        questionsModel.getQuestionsData(new ResultCallBack<QuestionsBean>() {
            @Override
            public void onSuccess(QuestionsBean questionsBean) {
                mView.setData(questionsBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}
